home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / Demos / AirHockey / modMisc.bas < prev    next >
Encoding:
BASIC Source File  |  2001-10-08  |  450 b   |  16 lines

  1. Attribute VB_Name = "modMisc"
  2. Option Explicit
  3.  
  4. Public Function aCos(dCos As Double) As Double
  5.     On Error Resume Next 'Assume any errors mean the aCos = 0
  6.     'Here we will figure out the arccosine..
  7.     aCos = Atn(Sqr(1 - (dCos * dCos)) / dCos)
  8. End Function
  9.  
  10. Public Sub PrintVector(vec As D3DVECTOR, Optional ByVal s As String = vbNullString)
  11.     With vec
  12.         Debug.Print s; " X="; .x; " Y="; .y; " Z="; .z
  13.     End With
  14. End Sub
  15.  
  16.